home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 015a / tidy10.zip / TIDY.TXT < prev    next >
Text File  |  1993-02-26  |  4KB  |  85 lines

  1.  
  2.  
  3.  
  4.                                    TIDY
  5.                       (A program to reduce clutter.)
  6.  
  7.  
  8.  
  9. No, It's not the latest in artificial intelligence and it won't
  10. compress your files down to a zillionth of there original size but
  11. TIDY is a useful tool that will help get rid of the clutter that
  12. usually builds up on a hard disk. 
  13.  
  14. TIDY is a variant of the DOS delete command. The intent here is not to
  15. try to replace the delete command, but to add functionality that the
  16. delete does not provide. First, with TIDY you specify the relative age
  17. of the files to delete. TIDY will only remove files of that age (or
  18. older). Second, TIDY won't ask you if it's OK to delete all the files
  19. in a directory if that is what you specified. This way you can embed
  20. the command in a batch file without having give conformation each
  21. time it's run. I  run TIDY from inside my AUTOEXEC.BAT file so that
  22. each time I boot, all of the specified files will be tested to see if
  23. they should be deleted.
  24.  
  25. The general syntax of the TIDY command is shown below:
  26.  
  27. C:\> tidy -NP file [file [...]]
  28.  
  29. where    N =    The number of units old (P) the file must be in order
  30.                 to consider it for deletion.
  31.     P =    The time unit: 'm' or 'M' for minutes; 'h' or 'H' for
  32.                 hours; or 'd' or 'D' for days.
  33.     file =    One or more path names (wild cards allowed) of files
  34.                 to consider for deletion.
  35.                 
  36. (You can also get a synopsis of the command syntax by typing the word
  37. "tidy" by itself at the DOS prompt).
  38.  
  39. For example, assume that you have one directory you use only for
  40. transitory files that you don't care much about called '\trash' and
  41. another for backups of document and program source called '\backups'.
  42. You might consider putting something like the following in your
  43. AUTOEXEC.BAT file:
  44.  
  45. tidy  -1h c:\trash\*.*
  46. tidy  -2d c:\backups\*.c
  47. tidy  -10d c:\backups\*.doc
  48.  
  49. This will (each time you boot) delete all files older than one hour in
  50. the \trash directory as well as the C source code older that two days
  51. and  documents older than 10 days in the \backups directory.
  52.  
  53. OK, but you say: "The power failed while I was updating my 1992 tax
  54. forms! The updated copy is no good and if I reboot (When the power
  55. comes back) TIDY may delete my only backup!". Well, I guess you could
  56. reboot from a floppy and save off an extra copy before booting from
  57. the hard disk again but there is a better way. Reboot as usual and
  58. after the computer beeps signaling the end of the ROM diagnostics,
  59. depress and hold one of the Alt., Shift, or Ctrl keys until the
  60. AUTOEXEC.BAT file completes. TIDY will sense your state of panic and
  61. leave your backup unscathed. 
  62.  
  63. I've added a second tool called TOUCH that you might find of use.
  64. TOUCH will update the time stamp of  the specified file(s) to the
  65. current time. By using TOUCHING a file, you can forestall the effects
  66. of TIDY when it runs because it doesn't look as old as it really is.
  67. (TOUCH is useful for programmers that use a 'make' utility to force a
  68. rebuild of a target file without having to change one of it's depend
  69. files).
  70.  
  71. The legal stuff:
  72.  
  73. TIDY and TOUCH are offered as is, without cost, and WITHOUT WARRANTY
  74. OF ANY KIND. Although I offer TIDY and TOUCH as 'FREE WARE', I retain
  75. the copyright and all rights of authorship. Any damages resulting from
  76. use of this software is limited to the payment you made to me
  77. (nothing). You have the right to copy and distribute TIDY and TOUCH
  78. together with this document so long as you include all of the original
  79. files unaltered and do not charge a fee of any kind.
  80.  
  81. If you have questions or comments regarding TIDY or TOUCH contact 
  82. me on CompuServe (71571,14) or on the Shareware South BBS Atlanta GA 
  83. (404)370-0736
  84. Enjoy, Ken Harrington
  85.